﻿using Basic.OARemoteModel.UserFill;
using Basic.OARemoteModel.UserFill.Model;
using Basic.OAService.Interface;
using WeDonekRpc.Client;
using WeDonekRpc.Client.Interface;

namespace Basic.OAService.RpcEvent
{
    internal class UserFillEvent : IRpcApiService
    {
        private readonly IUserFillService _Service;

        public UserFillEvent ( IUserFillService service )
        {
            this._Service = service;
        }
        public bool RevokeFillIn ( RevokeFillIn obj )
        {
            return this._Service.Revoke(obj.Id, obj.EmpId);
        }
        public UserFillData GetUserFillItem ( GetUserFillItem obj )
        {
            return this._Service.GetItem(obj.Id);
        }
        public bool SubmitFillIn ( SubmitFillIn obj )
        {
            return this._Service.Submit(obj.Id, obj.EmpId);
        }
        public PagingResult<UserFillItem> QueryUserFillItem ( QueryUserFillItem query )
        {
            return this._Service.Query(query.Query, query.ToBasicPage());
        }
    }
}
